//
//  FQMarqueeView.swift
//  SwiftProject
//
//  Created by 董駸 on 2023/4/7.
//

import UIKit

class FQMarqueeView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
    }
    convenience init(_ a : String) {
        self.init()
        backgroundColor = .white
        clipsToBounds = true
        layer.cornerRadius = 8
        
        let lb = QMUILabel(font: .rSFont(11), textColor: .qmui_color(withHexString: "ff423d")!)
        lb.text = "公告"
        lb.textAlignment = .center
        addSubview(lb)
        
        lb.snp.makeConstraints { make in
            make.left.equalTo(12)
            make.centerY.equalToSuperview()
            make.size.equalTo(CGSizeMake(27, 16))
        }
        
        let label = QMUIMarqueeLabel()
        label.text = "为了保证您的账户安全，请谨记本平台不会以任何形式要求转账，提供验证码，谨防电信网络诈骗！"
        label.textColor = .qmui_color(withHexString: "2f3951")
        label.shouldFadeAtEdge = false
        label.font = .rSFont(12)
        addSubview(label)
        
        label.snp.makeConstraints { make in
            make.left.equalTo(lb.snp.right).offset(8)
            make.right.equalTo(-10)
            make.centerY.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
